﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="VehicleAdd.aspx.cs" Inherits="Vehicle_Base_VehicleAdd" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div id="SubMain">
        <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
            DataSourceID="VehicleSource" 
            DefaultMode="Insert" >
            <Fields>
                <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" 
                    Visible="False" />
                <asp:BoundField DataField="FrameNO" HeaderText="车架号" 
                    SortExpression="FrameNO" />
                <asp:BoundField DataField="VehicleID" HeaderText="车牌号" 
                    SortExpression="VehicleID" />
                <asp:BoundField DataField="VehicleType" HeaderText="车辆类型" 
                    SortExpression="VehicleType" />
                <asp:BoundField DataField="VehiclePrice" HeaderText="车辆价格" 
                    SortExpression="VehiclePrice" />
                <asp:BoundField DataField="StartUseDate" HeaderText="使用日期" 
                    SortExpression="StartUseDate" />
                <asp:BoundField DataField="KeepPerson" HeaderText="保管人" 
                    SortExpression="KeepPerson" />
                <asp:BoundField DataField="BackupKeyPerson" HeaderText="备用钥匙管理人" 
                    SortExpression="BackupKeyPerson" />
                <asp:BoundField DataField="PlanScrapDate" HeaderText="计划报废日期" 
                    SortExpression="PlanScrapDate" />
                <asp:TemplateField HeaderText="所属机构" SortExpression="OrganID">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("OrganID") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <InsertItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("OrganID") %>'></asp:TextBox>
                    </InsertItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("OrganID") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="ChargePerson" HeaderText="负责人" 
                    SortExpression="ChargePerson" />
                <asp:BoundField DataField="SuperChargePerson" HeaderText="总负责人" 
                    SortExpression="SuperChargePerson" />
      
                <asp:CommandField ShowInsertButton="True" />
      
            </Fields>
        </asp:DetailsView>
        <asp:ObjectDataSource ID="VehicleSource" runat="server" InsertMethod="Add" 
            SelectMethod="GetModel" TypeName="BLL.VehicleBLL" 
            DataObjectTypeName="Model.Vehicle" oninserted="VehicleSource_Inserted" >
            <SelectParameters>
                <asp:Parameter DefaultValue="FrameNO" Name="FrameNO" Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
    
 <div id="Sub">
  <ul>
  <li>车架号：<asp:TextBox ID="txt_FrameNO" runat="server"></asp:TextBox>
             </li>
  <li>车牌号：<asp:TextBox ID="txt_VehicleID" runat="server"></asp:TextBox>
             </li>
  <li>车辆类型：<asp:DropDownList ID="ddl_Type" runat="server">
      <asp:ListItem>1</asp:ListItem>
      <asp:ListItem>2</asp:ListItem>
      <asp:ListItem>3</asp:ListItem>
      </asp:DropDownList>
             </li>
  <li>车辆价格：<asp:TextBox ID="txt_Price" runat="server"></asp:TextBox>
             </li>
  <li>使用日期：<asp:TextBox ID="txt_StartDate" runat="server" Text="2013-1-1"></asp:TextBox>
             </li>
  <li>保管人：<asp:TextBox ID="txt_Keep" runat="server"></asp:TextBox>
             </li>
  <li>钥匙备保人：<asp:TextBox ID="txt_BackupKey" runat="server"></asp:TextBox>
             </li>
  <li>计划报废日期：<asp:TextBox ID="txt_PlanDate" runat="server" Text="2013-1-1"></asp:TextBox>
             </li>
  <li>机构编号：<asp:DropDownList ID="ddl_Organ" runat="server">
      <asp:ListItem>1001</asp:ListItem>
      <asp:ListItem>1002</asp:ListItem>
      <asp:ListItem>1003</asp:ListItem>
      </asp:DropDownList>
             </li>
  <li>负责人：<asp:TextBox ID="txt_ChargePerson" runat="server"></asp:TextBox>
             </li>
  <li>总负责人：<asp:TextBox ID="txt_SuperCharge" runat="server"></asp:TextBox>
             </li>
  <li>
      <asp:Button ID="btn_Add" runat="server" Text="添加" onclick="btn_Add_Click" />
             </li>
  </ul>
        </div>
    
    </form>
</body>
</html>
